Hi there. I'm trying to build some of the SDK as a set of static frameworks in order to incorporate them into a single dynamic framework used for my app and app extension, as per https://github.com/Carthage/Carthage/blob/master/Documentation/StaticFrameworks.md. Building the frameworks static seems to work, but when I try to build the single framework, I see the following errors.
(Building for Simulator:)
Undefined symbols for architecture x86_64:
"___llvm_profile_runtime", referenced from:
___llvm_profile_runtime_user in AWSCognitoIdentityProvider(AWSCognitoIdentityUser.o)
___llvm_profile_runtime_user in AWSCognitoIdentityProvider(NSData+AWSCognitoIdentityProvider.o)
___llvm_profile_runtime_user in AWSCognitoIdentityProvider(AWSCognitoIdentityProviderResources.o)
___llvm_profile_runtime_user in AWSCognitoIdentityProvider(tommath.o)
___llvm_profile_runtime_user in AWSCognitoIdentityProvider(AWSCognitoIdentityProviderService.o)
___llvm_profile_runtime_user in AWSCognitoIdentityProvider(AWSCognitoIdentityUserPool.o)
___llvm_profile_runtime_user in AWSCognitoIdentityProvider(AWSCognitoIdentityProviderSrpHelper.o)
...
(maybe you meant: ___llvm_profile_runtime_user)
"_OBJC_CLASS_$_AWSCognitoIdentityASF", referenced from:
objc-class-ref in AWSCognitoIdentityProviderASF(AWSCognitoIdentityProviderASF.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
(Building for device:)
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_AWSCognitoIdentityASF", referenced from:
objc-class-ref in AWSCognitoIdentityProviderASF(AWSCognitoIdentityProviderASF.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've put together a minimal example; please check out https://github.com/joelkraut/AWS-static-frameworks-bug.
What service are you using?
S3, Cognito
In what version of SDK are you facing the problem?
2.6.12
Is the issue limited to Simulators / Actual Devices?
No
Can your problem be resolved if you bump to a higher version of SDK?
No
Is this problem related to specific iOS version?
No
How are you consuming the SDK? CocoaPods / Carthage / Prebuilt frameworks?
Carthage building static frameworks, a la https://github.com/Carthage/Carthage/blob/master/Documentation/StaticFrameworks.md
Can you give us steps to reproduce with a minimal, complete, and verifiable example? Please include any specific network conditions that might be required to reproduce the problem.
Yes: https://github.com/joelkraut/AWS-static-frameworks-bug
If you need help with understanding how to implement something in particular then we suggest that you first look into our developer guide. You can also simplify your process of creating an application by using Mobile Hub.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
It would actually be really great if someone looked at this.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.
Enable Edit Scheme -> Test -> Options -> Code Coverage with all targets works for me.
The other way is set Other Linker Flags to -fprofile-instr-generate.
Most helpful comment
Enable
Edit Scheme -> Test -> Options -> Code Coveragewithall targetsworks for me.The other way is set
Other Linker Flagsto-fprofile-instr-generate.