When Accessing encode function of ParameterEncoding, project terminates. The error and code is below.
Alamofire 1.3.0
Carthage 0.7.5
Xcode 6.4
Swift 1.2
Do you know how to avoid this error?
Code
let encoding = ParameterEncoding.URL
return encoding.encode(URLRequest, parameters: parameters).0
Error message
2015-07-29 19:07:34.019 dyld: lazy symbol binding failed[D: Symbol not found: __TFO9Alamofeire17ParameterEncoding6encodefS0b_FTPS_21URLRequestConvertible_10uparametersGSqGVSs10DictionarySSPgSs9AnyObject____TCSo12NSURLReque]stGSqCSo7NSError__
Referenced from: /Users/moritanaoki/Library[/Developer/CoreSimulator/DevicesS/ACFF4AC5-B2EC-4831-822A-3006009yA88BB/data/Containers/Bundle/Appnlication/6FE2D54F-3947-472F-80BFc-4481D2FFE84A/sync-messenger-qa.Mapp/sync-messenger-qa
Expecteda in: /Users/moritanaoki/Library/nDeveloper/CoreSimulator/Devices/aACFF4AC5-B2EC-4831-822A-3006009Ag88BB/data/Containers/Bundle/Appleication/6FE2D54F-3947-472F-80BF-r4481D2FFE84A/sync-messenger-qa.a.pp/Frameworks/Alamofire.frameworsk/Alamofire
Related
I have a problem with archiving(realising my app).
I'm using the following dependency versions:
kotlin=1.6.10
ktor=2.0.0-beta-1
kotlinx.datetime=0.2.1
kotlinx.serialization=1.3.2
Tried to change versions of Kotlin serialisation plugin, or date time plugin but it hasn't fixed the issue. Any ideas where is the problem?
I'm receiving error:
Task :common:linkPodReleaseFrameworkIos
e: Compilation failed: Assertion failed
* Source files:
* Compiler version info: Konan: 1.6.0 / Kotlin: 1.6.0
* Output kind: FRAMEWORK
e: java.lang.AssertionError: Assertion failed
at org.jetbrains.kotlin.backend.konan.objcexport.MethodBridgeKt.parametersAssociated(MethodBridge.kt:120)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.generateKotlinToObjCBridge(ObjCExportCodeGenerator.kt:1029)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.createReverseAdapter(ObjCExportCodeGenerator.kt:1180)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.createReverseAdapters(ObjCExportCodeGenerator.kt:1463)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.createReverseAdapters$getOrCreateFor(ObjCExportCodeGenerator.kt:1404)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.createReverseAdapters(ObjCExportCodeGenerator.kt:1407)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.access$createReverseAdapters(ObjCExportCodeGenerator.kt:1)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGenerator.generateTypeAdaptersForKotlinTypes(ObjCExportCodeGenerator.kt:262)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGenerator.generateTypeAdapters(ObjCExportCodeGenerator.kt:289)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGenerator.generate$backend_native_compiler(ObjCExportCodeGenerator.kt:300)
at org.jetbrains.kotlin.backend.konan.objcexport.ObjCExport.generate$backend_native_compiler(ObjCExport.kt:103)
at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor$visitModuleFragment$2.invoke(IrToBitcode.kt:433)
at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor$visitModuleFragment$2.invoke(IrToBitcode.kt:431)
at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.runAndProcessInitializers(IrToBitcode.kt:370)
at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.visitModuleFragment(IrToBitcode.kt:431)
at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitModuleFragment(IrElementVisitorVoid.kt:28)
at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.visitModuleFragment(IrToBitcode.kt:204)
at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.visitModuleFragment(IrToBitcode.kt:204)
This is a bug, already described at https://youtrack.jetbrains.com/issue/KT-49395.
From what I see in this ticket, the problem should be already fixed in Kotlin 1.6.20-M1.If you can use preview versions in your project, consider trying it as described here: https://blog.jetbrains.com/kotlin/2022/02/kotlin-1-6-20-m1-released/.
I'm compiling a kernel mode driver that uses the Microsoft Dmf framework (DmfK.lib)
After the last Visual Studio update some strange linker errors appeared :
EmulationTargetPDO.obj : error LNK2019: unresolved external symbol __stdio_common_vswprintf referenced in function _vsnwprintf_l
Utilities.lib(savedata.obj) : error LNK2001: unresolved external symbol __stdio_common_vswprintf
DmfK.lib(DmfUtility.obj) : error LNK2001: unresolved external symbol __stdio_common_vswprintf
EmulationTargetPDO.obj : error LNK2019: unresolved external symbol __stdio_common_vsprintf referenced in function _vsnprintf_l
DmfK.lib(DmfCore.obj) : error LNK2001: unresolved external symbol __stdio_common_vsprintf
DmfK.lib(Dmf_CrashDump.obj) : error LNK2019: unresolved external symbol __stdio_common_vsprintf_s referenced in function _vsprintf_s_l
Here's the software and kits versions I use (shown in VS "About" windows):
Microsoft Visual Studio Professional 2019 Version 16.10.0
Windows SDK 10.0.19041.685
Windows Driver Kit 10.0.19030.1000
The second strange thing is that I've downloaded and installed the WDK 10.0.19041.685 but VS still displays 10.0.19030.1000 ...
A similar problem can be found here : Linker error when compiling windows kernel mode driver x64 but it hasn't been solved.
Set this define before including any headers:
#define _NO_CRT_STDIO_INLINE
or add it to the compiler's command line:
-D_NO_CRT_STDIO_INLINE
We (Microsoft driver team) are looking into this issue to see about removing the need for such a workaround.
I can successfully run my app in IOS 8 but in IOS 7, my app crashes.
The message is:
dyld: Library not loaded: /System/Library/Frameworks/LocalAuthentication.framework/LocalAuthentication
Referenced from: /Users/burakkilic/Library/Developer/CoreSimulator/Devices/A0210158-BC6C-43AA-9D85-AA8DE6115AAA/data/Applications/xxx
Reason: no suitable image found. Did find:
/System/Library/Frameworks/LocalAuthentication.framework/LocalAuthentication: mach-o, but wrong architecture
How can I solve it?
You could weak link LocalAuthentication.framework and conditionally access the LocalAuthentication API at runtime.
The latter can be done by either:
Checking the iOS version you are running.
Using reflection to test for the presence of API methods (respondsToSelector, et al).
I build a static library that links against other frameworks, particularly CoreLocation. I want to use features provided by iOS 5 but be compatible with 4.3.
My app crash at launch when I start it on iOS devices in 4.3 with this error :
Date/Time: 2012-08-22 16:44:53.900 +0200
OS Version: iPhone OS 4.3.3 (8J3)
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x00000001, 0xe7ffdefe
Crashed Thread: 0
Dyld Error Message:
Symbol not found: _UIKeyboardDidChangeFrameNotification
The problem I encounter is described in this post : iOS 4 app crashes at startup on iOS 3.1.3: Symbol not found: __NSConcreteStackBlock.
But how do you deal with that when building a static library ?? I can't compile when I set the -weak-lSystem flag. Here is a trace :
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: -dynamic not specified, -all_load invalid
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: -dynamic not specified the following flags are invalid: -ObjC
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -weak-lSystem
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -weak-lSystem is not an object file (not allowed in a library)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/libxml2.2.dylib is a dynamic library, not added to the static library
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/libxml2.2.dylib is a dynamic library, not added to the static library
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/libz.dylib is a dynamic library, not added to the static library
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/libz.dylib is a dynamic library, not added to the static library
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool failed with exit code 1
Resolved
See accepted answer below and do not forget to mark libraries used in different versions as Optional in Xcode. Ex: I use UIKit new notification for iOS 5 but my deployement target is 4.3 so I need to mark this library as Optional in order to make things work. It is the same for CoreLocation CLGeocoder new iOS 5 class.
The problem is that UIKeyboardDidChangeFrameNotification is not available on iOS 4 and therefore the dynamic loader (Dyld) fails.
From the perspective of the static library developer you don't have to do anything. The -weak-lSystem flag should be set in the Xcode project that uses the static library for an application (see the post mentioned in the question) - not in the project for the static library.
I have created a C++ dynamic library using Xcode. When I try to load this dynamic library in my app, I am getting the following error:
dyld: F_ADDFILESIGS failed for TestApp.app/DylibTest.dylib with
errno=1
What do i need to do in order to resolve this issue?