pytorch/workshops

[demo:PTMobileWalkthruIOS] Building in a Real iOS Device Fail and the Solution

Ray005 opened this issue · 3 comments

in demo:PTMobileWalkthruIOS

"pod insatll" has been run under the right folder, the red of the "Pods" was fixed. But the file : "libPods-PTMobileDemo.a" remain to be red, I have done everything I can but it doesn't work.

I don't know if the file “libPods-PTMobileDemo.a" was forgotten to be uploaded to github.

Hoping to get help from you

My fault. I found the trick to run properly when I'm watching your tutorial video on youtube. The .xcworkspace should be open rather than the .xcodeproj as usual when cocopods is imported to a project.

When running in a real ios device rather than in a simulator, the exact problem of the project is the LibTorch version(1.6.0 installed by cocopods) the project using is only complied for simulator.

To simplyfy the problem, I simple switch the version of LibTorch from 1.6.0 to 1.9.0. And it woks immediately in my iPhone 12 running ios 15.6.1.

Hallelujah

As you see, the exact problem is the version of LibTorch, if you want to run the project in a real ios decive. So I'm closing the issue.

This is my Podfile.lock: (And I recommand you to change the version in Podfile and Podfile.lock before you run pod install)

PODS:

  • LibTorch (1.9.0):
    • LibTorch/Core (= 1.9.0)
  • LibTorch/Core (1.9.0):
    • LibTorch/Torch
  • LibTorch/Torch (1.9.0)

DEPENDENCIES:

  • LibTorch (~> 1.9.0)

SPEC REPOS:
trunk:
- LibTorch

SPEC CHECKSUMS:
LibTorch: d89f452b8b932002bd98884b3921850a95c35e14

PODFILE CHECKSUM: 7e16013538a7cf355266fa3b4fff6e16b8b93fea

COCOAPODS: 1.11.3