braze-inc / braze-cordova-sdk

Public repo for the Braze Cordova SDK
https://www.braze.com
Other
21 stars 62 forks source link

Facing issue with building ios for 2.13.0 #48

Closed xueligoh closed 4 years ago

xueligoh commented 4 years ago

Hi,

We are facing error with building the cordova app for iOS with appboy-cordova-sdk 2.13.0

Steps carried out:

cordova create hello com.example.hello HelloWorld
cordova plugin add https://github.com/appboy/appboy-cordova-sdk#master
cordova platform add ios
cordova build ios

Error Encountered

The following build commands failed:
    CompileC /Users/User1/Library/Developer/Xcode/DerivedData/HelloWorld-fohjbtbrljcmdxgcsuglqtcgzhsu/Build/Intermediates.noindex/HelloWorld.build/Debug-iphonesimulator/HelloWorld.build/Objects-normal/x86_64/IDFADelegate.o /Users/User1/Desktop/Project/hello/platforms/ios/HelloWorld/Plugins/cordova-plugin-appboy/IDFADelegate.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    CompileC /Users/User1/Library/Developer/Xcode/DerivedData/HelloWorld-fohjbtbrljcmdxgcsuglqtcgzhsu/Build/Intermediates.noindex/HelloWorld.build/Debug-iphonesimulator/HelloWorld.build/Objects-normal/x86_64/AppDelegate+Appboy.o /Users/User1/Desktop/Project/hello/platforms/ios/HelloWorld/Plugins/cordova-plugin-appboy/AppDelegate+Appboy.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler

Additional information:

Please kindly advise. Thank you.

radixdev commented 4 years ago

Hi @xueligoh ,

I am able to build the app when opening HelloWorld.xcworkspace in XCode directly vs running cordova build ios. We're investigating why running cordova build ios directly does not build your project, but in the meantime I'd suggest using the .xcworkspace file in XCode directly vs command line.

cauanicastro commented 4 years ago

Hey guys, any update on that? I'm having the same issues as @xueligoh

radixdev commented 4 years ago

It appears to be an issue with how imports were changed in the last release (see https://github.com/Appboy/appboy-cordova-sdk/commit/3f9262f736205d8893b183f1afd79d3b86f68550#diff-73820c7b9dca00770bc1c4c543748cd4R2). This was done to address the deprecation warning cordova gave about using the old podspec format (see https://github.com/Appboy/appboy-cordova-sdk/commit/3f9262f736205d8893b183f1afd79d3b86f68550#diff-53f390d375398624afe1cfe1125f42bfL39). I will update this thread with more as the investigation continues.

radixdev commented 4 years ago

@cauanicastro are you able to build ios when opening the *.xcworkspace directly in XCode vs running cordova build ios?

cauanicastro commented 4 years ago

Awesome! Thank you for looking into that!!

eliasku commented 4 years ago

It appears to be an issue with how imports were changed in the last release (see 3f9262f#diff-73820c7b9dca00770bc1c4c543748cd4R2). This was done to address the deprecation warning cordova gave about using the old podspec format (see 3f9262f#diff-53f390d375398624afe1cfe1125f42bfL39). I will update this thread with more as the investigation continues.

Thank you! I can confirm that reverting back to <framework src="Appboy-iOS-SDK" type="podspec" spec="~> 3.20.2" /> in plugin.xml resolves iOS project building and running using Cordova commands

radixdev commented 4 years ago

@eliasku thank you for checking that. To confirm, that was done on the 2.13.0 SDK and no other changes were made to fix? And the exact build commands in https://github.com/Appboy/appboy-cordova-sdk/issues/48#issue-562184820 now work after that change?

eliasku commented 4 years ago

@radixdev yes, just revert <podspec> tag to previous <framework>. Checked commands: cordova build ios and cordova run ios. I'm not familiar with the latest Cordova iOS configuration specs, maybe <podspec> is not configured properly.

Can't say for another versions or environment, my list:

eliasku commented 4 years ago

@radixdev hello.

Sorry, 2 weeks ago I totally messed up and miss something, maybe plugin is not added properly and build was success, but today our team facing the issue again:

1) When building from command-line cordova build ios - all AppBoy headers are missing and we have 2 compile errors.

2) When building from XCode workspace - we have successful build

Please suggest

radixdev commented 4 years ago

Hi all,

We have reverted the plugin.xml tag back to using framework. Please let us know if 2.14.0 fixes your issue.

radixdev commented 4 years ago

I'm closing this issue for now. Please let me know if you continue to have issues and we'll debug further.