ibm-bluemix-mobile-services / bms-clientsdk-cordova-plugin-push

Cordova Push notifications Plugin for IBM Cloud Mobile Services
Apache License 2.0
9 stars 9 forks source link

Fail to build for IOS with XCode 8.3 #77

Closed tverilytt closed 6 years ago

tverilytt commented 7 years ago

Hi! Thanks for great plugin, works well for me on Android.

I am not able to build for IOS though. My environemnt is>

Details on build failre below, when I open the project in XCode, it tells me I have to "Convert to current Swift version". I have tried to choose both "Later" and "Convert". "Later" gives error since no valid Swift version is chosen, "Convert" results in compilation errors.

I wonder if anyone else has tried with XCode 8.3? I did try with 8.0 too, and tried to choose Swift 2.3 (which was an option there), but that gives compilation errors too.

Cheers -jo2

$ cordova build ios - fails reported at end:

The following build commands failed: Ld /Users/someuser/Library/Developer/Xcode/DerivedData/personAAL-ezboomnqywivxjhfbkeoneivsnzk/Build/Intermediates/ArchiveIntermediates/personAAL/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/BMSAnalyticsAPI.build/Objects-normal/arm64/BMSAnalyticsAPI normal arm64 Ld /Users/someuser/Library/Developer/Xcode/DerivedData/personAAL-ezboomnqywivxjhfbkeoneivsnzk/Build/Intermediates/ArchiveIntermediates/personAAL/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/BMSAnalyticsAPI.build/Objects-normal/armv7/BMSAnalyticsAPI normal armv7 (2 failures) Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/someuser/tmp/personAAL/platforms/ios/cordova/build-debug.xcconfig,-workspace,personAAL.xcworkspace,-scheme,personAAL,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,personAAL.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/someuser/tmp/personAAL/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/someuser/tmp/personAAL/platforms/ios/build/sharedpch

$ pod install

Pod installation complete! There are 4 dependencies from the Podfile and 5 total pods installed.

[!] The personAAL [Debug] target overrides the LD_RUNPATH_SEARCH_PATHS build setting defined in `Pods/Target Support Files/Pods-personAAL/Pods-personAAL.debug.xcconfig'. This can lead to problems with the CocoaPods installation

[!] The personAAL [Release] target overrides the LD_RUNPATH_SEARCH_PATHS build setting defined in `Pods/Target Support Files/Pods-personAAL/Pods-personAAL.release.xcconfig'. This can lead to problems with the CocoaPods installation

AnanthaKrish commented 7 years ago

Hi @tverilytt . Cordova Push plugin will work with Xcode 8.3 and lower versions. you don't have to select convert the code option.

In the logs I am seeing personAAL causing some issue there ? What is that personAAL ?

Are you using any pods other than BMSPush, BMSCore and BMSAnalyticsAPI ?

tverilytt commented 7 years ago

Hi @AnanthaKrish - That sounds good. personAAL is the name of the app / project. My Podfile looks like this, BMSSecurity in addition to the 3 you mention:

platform :ios, '8.0' use_frameworks! target 'personAAL' do pod 'BMSAnalytics', '~>2.0' pod 'BMSSecurity', '~>2.0' pod 'BMSCore', '~>2.3' pod 'BMSPush', '~>3.2' end

tverilytt commented 7 years ago

Hi again! I downgraded to Cordova 6.3, since the docs says 6.3 or below. I found this in the docs for the bms-clientsdk-cordova-plugin-core plugin:

But I guess the problem was I was opening in XCode the personAAL.xcodeproj, opening the personAAL.xcworkspace seems to work, now I can build and deploy my app to an IOS device and can send push notifications through the Bluemix Push Notification service.

I guess this issue can be closed!

Cheers -jo

AnanthaKrish commented 7 years ago

@tverilytt You should open the .xcworkspace only.

tverilytt commented 7 years ago

Ja-a, I have just been used to using the .xcodeproj version earlier for my mobile apps.

Semms like it is important to use cordova 6.3.0, tried again with 7.0, and that breaks i XCode.

Cheers -jo