No such module 'IBMCloudAppID' in xcode 10.2 Swift - swift3

I am trying to use IBMCloudAppId is my swift project and getting an error when I am trying to import IBMCloudAppID in my xcode 10.2.
I followed these steps as
Open your Xcode project and enable Keychain Sharing (Under project settings > Capabilities > Keychain sharing)
Under project setting > info > Url Types, Add $(PRODUCT_BUNDLE_IDENTIFIER) as a URL Scheme
Add the following import to your AppDelegate.swift file:
import IBMCloudAppID
Getting an error
No such module 'IBMCloudAppID' in xcode 10.2
And my POD file looks like
use_frameworks!
def shared_pods
platform :ios, '10.2'
pod 'BMSCore', '~> 2.3.1'
pod 'JOSESwift', '~> 1.1.0'
pod 'IBMCloudAppID'
end
target 'IBMCloudAppID' do
use_frameworks!
pod 'IBMCloudAppID'
shared_pods
end
target 'IBMCloudAppIDTests' do
shared_pods
end

Looks like you haven't installed pods in the application.
Try with the following steps which should resolve the issue.
Install Cocoapods in your machine
Run pod install in the terminal at the root of your app project.
open your-project.xcworkspace in Xcode
Clean and Build the app

Answer to this question
And after opening workspace, build library first and then project.

Related

How to import requests_toolbelt correctly in google app engine?

I am trying to import requests_toolbelt package in google app engine but keep getting import error. Already checked at https://toolbelt.readthedocs.io/en/latest/adapters.html#appengineadapte and https://cloud.google.com/appengine/docs/standard/python/issue-requests also gives same error.
It works fine on local but after deploying, the error appears:
ImportError: No module named requests_toolbelt.adapters
I have this:
import requests
from requests_toolbelt.adapters import appengine
if not os.environ.get('SERVER_SOFTWARE', '').startswith('Google App Engine'):
appengine.monkeypatch()
requirements.txt has
requests
requests_toolbelt
Since you are using Python2.7 in the Standard environment, having the requests_toolbelt library in the requirements.txt file is not enough to upload it to App Engine, since it is not one of the Built-in Third-party Libraries.
To add it, you can follow this steps, as mentioned in the official documentation:
Run the following command:
pip install -t lib -r requirements.txt
This will install all the packages to the local environment, and copy them to the lib folder afterwards. Documentation on this.
Create the following file, named appengine_config.py:
from google.appengine.ext import vendor
# Add any libraries installed in the "lib" folder.
vendor.add('lib')
Note that this file needs to be in the same root path as the app.yaml, and the 'lib' string repersents the path from this root to the folder you created in the previous point.
Redeploy the application with gcloud app deploy
Once that is done, you should be able to run the application without errors related to the library.
As a side note, these steps are only a requirement in Python 2.7 in the Standard App Engine environment. In Python3 or in Flexible, having the libraries listed in the requirements.txt file is enough.
I was recommend also to add the "lib" folder to the IDE Interpreter.
In IDE of IntelliJ like PyCharm you go to settings -> project -> project interpreter -> click on settings small button -> show all
Then click on folders icon:
Then click on add icon:
Then pick your lib folder

Conflicting names error when installing Alamofire pod

I created an app with a watch and a today extension running Xcode 8.2.1. with Swift 3. For all targets, I want to use Alamofire to fire up requests. This worked perfectly fine with the iOS app and the Watch Extension, but pod install throws following error when trying to add it to the today target:
The 'Pods-xY' target has frameworks with conflicting names: alamofire.
Here's my podfile:
target 'xY' do
use_frameworks!
pod 'Alamofire', '~> 4.4'
end
target 'xYToday' do
use_frameworks!
pod 'Alamofire', '~> 4.4'
end
target 'xYWatch Extension' do
use_frameworks!
pod 'Alamofire', '~> 4.4'
end
I ran into the same issue, just today. Apparently it is not possible to use the same framework in a today extension and in an app. See this comment.
Cocoapods should give a decent error message, which is a bug, but for now, only Apple could fix this like both you and I would have expected, see this comment by the same guy later in the thread.
Bummer!

GoogleCloudMessaging integration on iOS using cocoapods

I'm trying to integrate GoogleCloudMessaging(GCM) on iOS project. (Cocos2d-x v3.2)
As per the google's instruction, (https://developers.google.com/cloud-messaging/ios/client)
I use cocoapods but failed with following error.
$ pod install
Updating local specs repositories
Analyzing dependencies
[!] Unable to satisfy the following requirements:
- `GoogleCloudMessaging` required by `Podfile`
Here are what I tested.
install GCM on cocos2dx project (v3.2) -> failed.
create a non-cocos2dx project and install GCM -> succeeded
install GoogleAnalytics on cocos2dx project -> succeeded.
create a cocos2dx project using v3.7 and install GCM -> failed.
I don't have any clue yet why installing GCM is failed but GoogleAnalytics is not.
Is there anyone who succeed integrating GCM on iOS?
EDIT
This is my Podfile
# Uncomment this line to define a global platform for your project
# platform :ios, '6.0'
source 'https://github.com/CocoaPods/Specs.git'
target 'SampleApp iOS' do
pod 'GoogleCloudMessaging'
end
target 'SampleApp Mac' do
end
I could solve this problem referring a post in cocos2d-x forum.
Changing Deployment Target to 7.0 or higher in Xcode project setting will clear this issue.

iOS Simulator doesn't launch with Calabash

I have Calabash installed as a pod in my project. The gem itself is installed using bundler. When I try to run cucumber for my Calabash target, the first features starts but just hangs and the simulator never launches:
$ bundle exec cucumber
Feature: Ensure Login and Oauth Screen Functionality
Scenario: Verify Welcome Page # features/Sign_in.feature:3
More details from my install:
# xcode installation location
$ xcode-select --print-path
/Applications/Xcode.app/Contents/Developer
# xcode version
$ xcodebuild -version
Xcode 5.1.1
Build version 5B1008
# calabash version
$ bundle exec calabash-ios version
0.9.168
# calabash < 0.9.169 or Xamarin IDE users
# start your app manually in the simulator or from Xcode and then launch a console
$ bundle exec calabash-ios console
> server_version
{
"outcome" => "SUCCESS",
"app_id" => "[REDACTED]",
"simulator_device" => "iPhone",
"version" => "0.9.168",
"app_name" => "[REDACTED]",
"iphone_app_emulated_on_ipad" => false,
"4inch" => true,
"git" => {
"remote_origin" => "git#github.com:jmoody/calabash-ios-server.git",
"branch" => "master",
"revision" => "adde106"
},
"app_version" => "2.0.1",
"iOS_version" => "7.1",
"system" => "x86_64",
"simulator" => "iPhone Simulator 463.9.41, iPhone OS 7.1 (iPhone Retina (4-inch)/11D167)"
}
Ok,that means calabash cannot locate the your app.
Try this first,
Comment out the APP_BUNDLE_PATH definition on
YourProject/features/support/01_launch.rb like #APP_BUNDLE_PATH =
"~/..../../myApp-cal.app" so The calabash gem can locate the app
automatically.
Open a console go to the project folder from it. Then enter gem install calabash-cucumber this will install the calabash gem its ok to run again even if you installed it previously there's no harm. Then enter calabash-ios setup in that terminal, this will create a calabash target and add the calabash framework to your iOS project. more details about the setup process is mentioned in here.
Now open the project file in xcode editor (You can see the calabash.framework added to your project's framework group successfully.) select the yourApp-cal target and the simulator you want clean, build and run the yourApp-cal target on your simulator.
Then stop it and come back to that console enter calabash-ios console console will start a ruby console that you can work with the app. now (while simulator is on your screen but your app is backbround on that simulator) type start_test_server_in_background your app must come to foreground. If that works the calabash can find and run your app on simulator.
Remember only if you create an app build on a separate folder using a xcodebuild command or script or something, thats the time to set the APP_BUNDLE_PATH variable.
Chathura's answer worked for one of my colleagues, but a couple of us had to find another solution.
The issue for us occurred after introducing CocoaPods. In Xcode, I opened Organizer and noticed we had a derived data folder for the BP (before Pods) project and another for the workspace with Pods. I deleted the derived data folder for the BP project and then everything worked.
I had re-setup calabash before doing this, so the solution in my case may have been a combination of Chathura's answer and mine.

Missing build.xml when creating project with ClickStart?

I am using Eclipse EE version and CloudBees plugin to create a ClickStart JBoss 7 project. However, I am not very familiar with the EE version of Eclipse, and used Netbeans to edit my JSP.
Then I used CloudBees SDK to run and deploy my new project but it failed (the command prompt):
D:\Personel\Java EE\HelloCloudBees>bees run
ERROR: java.io.FileNotFoundException: D:\Personel\Java
EE\HelloCloudBees\build.xml (The system cannot find the file
specified)
I found no build.xml file in my folder. How can I create it?
bees run command expect an ant-based project structure, so the build.xml. As documented
CloudBees project commands are only available for applications
generated using the Bees wizard (on the web), built using the
CloudBees SDK style.
This is more or less some legacy stuff, as is now superseded by ClickStart. Equivalent command would be bees app:run but require your app to first be packaged as a WAR and only support the default tomcat6 runtime. So for your specific use-case would be simpler to package and deploy on a local JBoss 7 server. To deploy on RUN#Cloud, use bees app:deploy or just git push and let DEV#Cloud Jenkins build and deploy for you (assuming you created app with a clickstart).
Also, there's no need to use Eclipse if you're familiar with NetBeans.
Have you tried out maven?If yes you can download it and then use mvn eclipse:eclipse and then you can import your project in your workspace using eclipse import capabilities.File -> Import -> Maven -> Existing Maven Project...you point to the file where your pom.xml file is..and is imported. Take into accoutn m2eclipse plugin in eclipse must be installed prior.
regards
\n\m