tristanhimmelman/AlamofireObjectMapper

Runtime crash due to ObjectMapper update till 2.2.2

Closed this issue · 12 comments

3 days ago ObjectMapper was updated to 2.2.2 version.
Main change - added new parameter to init
tristanhimmelman/ObjectMapper@fc44253

This cause runtime crash

dyld: lazy symbol binding failed: Symbol not found: _TFC12ObjectMapper6MapperCfT7contextGSqPS_10MapContext___GS0_x
Referenced from: /Users/romanvolkov/Library/Developer/CoreSimulator/Devices/B7317F47-8E47-497D-93FB-F72C5B14D11C/data/Containers/Bundle/Application/D733CFF5-CE84-4773-A037-0AE9735BF0B3/Treasure Hunt.app/Frameworks/AlamofireObjectMapper.framework/AlamofireObjectMapper
Expected in: /Users/romanvolkov/Library/Developer/CoreSimulator/Devices/B7317F47-8E47-497D-93FB-F72C5B14D11C/data/Containers/Bundle/Application/D733CFF5-CE84-4773-A037-0AE9735BF0B3/Treasure Hunt.app/Frameworks/ObjectMapper.framework/ObjectMapper

dyld: Symbol not found: _TFC12ObjectMapper6MapperCfT7contextGSqPS_10MapContext___GS0_x
Referenced from: /Users/romanvolkov/Library/Developer/CoreSimulator/Devices/B7317F47-8E47-497D-93FB-F72C5B14D11C/data/Containers/Bundle/Application/D733CFF5-CE84-4773-A037-0AE9735BF0B3/Treasure Hunt.app/Frameworks/AlamofireObjectMapper.framework/AlamofireObjectMapper
Expected in: /Users/romanvolkov/Library/Developer/CoreSimulator/Devices/B7317F47-8E47-497D-93FB-F72C5B14D11C/data/Containers/Bundle/Application/D733CFF5-CE84-4773-A037-0AE9735BF0B3/Treasure Hunt.app/Frameworks/ObjectMapper.framework/ObjectMapper

Current solution: define exact version of ObjectMapper
github "Hearst-DD/ObjectMapper" == 2.2.1

I have the same problem here.
我这里也有同样的问题

The following is the error log
下面是错误日志

dyld: lazy symbol binding failed: Symbol not found: __TFC12ObjectMapper6MapperCfT7contextGSqPS_10MapContext___GS0_x_
  Referenced from: /Users/username/Library/Developer/CoreSimulator/Devices/CDE46371-EF7E-4C2B-AC24-58207F131574/data/Containers/Bundle/Application/1C5ED111-2A55-4753-866F-DD7D88290C6A/appname.app/Frameworks/AlamofireObjectMapper.framework/AlamofireObjectMapper
  Expected in: /Users/username/Library/Developer/CoreSimulator/Devices/CDE46371-EF7E-4C2B-AC24-58207F131574/data/Containers/Bundle/Application/1C5ED111-2A55-4753-866F-DD7D88290C6A/appname.app/Frameworks/ObjectMapper.framework/ObjectMapper

dyld: Symbol not found: __TFC12ObjectMapper6MapperCfT7contextGSqPS_10MapContext___GS0_x_
  Referenced from: /Users/username/Library/Developer/CoreSimulator/Devices/CDE46371-EF7E-4C2B-AC24-58207F131574/data/Containers/Bundle/Application/1C5ED111-2A55-4753-866F-DD7D88290C6A/appname.app/Frameworks/AlamofireObjectMapper.framework/AlamofireObjectMapper
  Expected in: /Users/username/Library/Developer/CoreSimulator/Devices/CDE46371-EF7E-4C2B-AC24-58207F131574/data/Containers/Bundle/Application/1C5ED111-2A55-4753-866F-DD7D88290C6A/appname.app/Frameworks/ObjectMapper.framework/ObjectMapper

Use 2.2.1 version of objectmapper

I'm experiencing the same issue. When installing via Carthage it defaults to ObjectMapper 2.2.2.

@chrisdhaan use an explicit tag name, like this github "Hearst-DD/ObjectMapper" "2.2.1"

@vmseba I tried that and 2.2.2 was still installed. I'm assuming because the Carthage dependencies just uses the most recent tag as a sub-dependency.

Currently I've forked the branch and had to edit the sub dependencies to get it working. But I'm hoping this will be resolved soon and I can just use the framework.

I missed it in the first comment. Using github "Hearst-DD/ObjectMapper" == 2.2.1 worked so I no longer need to use a fork. This solution is fine for now.

so will we never be able to use the new versions of object mapper? or there is a new way to define our objects? i can confirm the fixed version works :)

I've just released an update which resolves the issue. Please let me know if the problem persists.

https://github.com/tristanhimmelman/AlamofireObjectMapper/releases/tag/4.0.2

so do i just need to update the alamofireobjectmanager with the pods and remove the direct reference to ObjectMapper 2.2.1?

@antonioreyna that's right. I just realized I didn't push the pod yet. That will be done momentarily

Thank you

I have the same problem and it still exists how do i fix this?

Here is my Cartfile

github "Alamofire/Alamofire" ~> 4.3.0
github "SwiftyJSON/SwiftyJSON"
github "tristanhimmelman/AlamofireObjectMapper" ~> 4.0.2
github "Hearst-DD/ObjectMapper" == 2.2.1
github "realm/realm-cocoa" ~> 2.5.0 
github "kaandedeoglu/KDCircularProgress"
github "robbiehanson/CocoaAsyncSocket" "master"
github "mindsnacks/MSWeakTimer" "master"
github "emqtt/CocoaMQTT" "master"
github "cesarferreira/SwiftEventBus" == 2.2.0
github "dekatotoro/SlideMenuControllerSwift" "master"
github "kean/Nuke" ~> 5.0

Here is my Cartfile.resolved

github "Alamofire/Alamofire" "4.4.0"
github "Hearst-DD/ObjectMapper" "2.2.1"
github "SwiftyJSON/SwiftyJSON" "3.1.4"
github "cesarferreira/SwiftEventBus" "2.2.0"
github "dekatotoro/SlideMenuControllerSwift" "bbd337c6f6a794ba6146afadfc8cebe884b68076"
github "emqtt/CocoaMQTT" "5c11ab7f8c801981cbea8a62ef52a40eb413c4db"
github "kaandedeoglu/KDCircularProgress" "1.5.2"
github "kean/Nuke" "5.1"
github "mindsnacks/MSWeakTimer" "3d7ccd7df7025fa6d839d932752fadefd2cc95fb"
github "realm/realm-cocoa" "v2.5.1"
github "robbiehanson/CocoaAsyncSocket" "53a1298f4bbb735a1e7ab235f6e74cf099a1583b"
github "tristanhimmelman/AlamofireObjectMapper" "4.1.0"

how do i fix this?