Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sanitize file names that include device_id for iPhone xs series #360

Merged
merged 1 commit into from
Oct 22, 2018

Conversation

HelveticaScenario
Copy link

the device_id of the new iPhone XS series has changed to a 25 digit hexadecimal string with a '-' character for the 9th character. '-' characters aren't allowed to be file names in python so when the autogenerated python files were imported they would fail with a syntax error due to the new device id being in the name. this sanitized the file names to replace the '-' character with a '_'

@collindutter
Copy link

Hah I didn't see this and fixed the same issue! https://github.com/collindutter/ios-deploy/commit/efef06839812f20679c1c69876c6a87fa24efc39

@timtraversy
Copy link

timtraversy commented Sep 29, 2018

Can we merge this please? 😄 It looks like a small fix and will let us use this lib for new iPhones.

@collindutter collindutter mentioned this pull request Oct 3, 2018
6 tasks
@timtraversy
Copy link

@shazron?

@joshstrange
Copy link

I know this it the epitome of a first world problem but can we get at least a vague timeline on how long it will take to merge this? I ask because if we are talking more than another week for a merge/release I need to start the process of building this myself so that our developers can deploy to the new phones.

@collindutter
Copy link

@joshstrange it's definitely not ideal, but you should be able to install ios-deploy from one of our forked repos where the fix is.

@HelveticaScenario
Copy link
Author

HelveticaScenario commented Oct 5, 2018

if you are using homebrew then you can run brew edit ios-deploy and
change the url to one of our repos, like i did here.

class IosDeploy < Formula
  desc "Install and debug iPhone apps from the command-line"
  homepage "https://github.com/phonegap/ios-deploy"
  url "https://github.com/ios-control/ios-deploy/archive/1.9.3.tar.gz"
  sha256 "9ef7430d20a777cd2916ab9d6aac849de11b349e85cf80048c95eca47d026e6c"
  head "https://github.com/phonegap/ios-deploy.git"

  bottle do
    cellar :any_skip_relocation
    sha256
"7d7f28b6bad93d0ffaaa4a0656f10caf03329a1dd087ff1dfd5b1b474665d2d6" =>
:mojave
    sha256
"9a8dd08fb6f05f9aa94253cfcff8ee8d95d6e4ebd47df0273ef184c3a308f52e" =>
:high_sierra
    sha256
"22cd1a7a916691d1a425377db4eceff20f686f83092c2141306bc4cdb3905573" =>
:sierra
    sha256
"29649cb0452652d45245eedccd4c16474efd07a629f4a916540117a73865e0c0" =>
:el_capitan
  end

  depends_on :xcode => :build
  depends_on :macos => :yosemite

  head do
    url "https://github.com/HelveticaScenario/ios-deploy.git"
  end

  def install
    xcodebuild "-configuration", "Release", "SYMROOT=build"

    xcodebuild "test", "-scheme", "ios-deploy-tests", "-configuration",
"Release", "SYMROOT=build"

    bin.install "build/Release/ios-deploy"
    include.install "build/Release/libios_deploy.h"
    lib.install "build/Release/libios-deploy.a"
  end

  test do
    system "#{bin}/ios-deploy", "-V"
  end
end

@timtraversy
Copy link

timtraversy commented Oct 6, 2018

Nice! I would add that the latest libimobiledevice version requires a higher version of usbmuxd, so after you make that edit to the ios-deploy brew file, run these terminal commands:

brew update
brew uninstall --ignore-dependencies libimobiledevice ios-deploy cocoapods
brew uninstall --ignore-dependencies usbmuxd
brew install --HEAD usbmuxd
brew unlink usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller ios-deploy cocoapods

However, I'm still getting the error: error: module importing failed: ('invalid syntax', ('temp.py', 1, 27, 'import fruitstrap_00008020-001C50503488002E\n')) backtrace unavailable.
Did anyone get this to work successfully?

@timtraversy
Copy link

Ok the brew edit ios-deploy solution didn't work for me so I just cloned @HelveticaScenario's fork, built it locally from the source using xcodebuild, and then used that build to replace the current one in the Homebrew Cellar. Hopefully this will get merged soon 👍

@sooxt98
Copy link

sooxt98 commented Oct 15, 2018

pls merge!

@brodycj
Copy link

brodycj commented Oct 15, 2018

I just requested testing & review on Slack since I do not use ios-deploy so much myself. I recommend you guys ping us via dev@cordova.apache.org or Slack in case of this kind of delay.

@beardo01
Copy link

Hey @brodybits, what is the Slack URL? Additionally, when would we sensibly expect this to be merged? If it's not far off I'll just wait for an update, otherwise I might go with @timtraversy's approach.

Cheers!

@brodycj
Copy link

brodycj commented Oct 16, 2018

what is the Slack URL?

https://cordova.slack.com/archives/CCH3ESRB8/p1539635196000100

Additionally, when would we sensibly expect this to be merged?

I cannot say anything myself. I said before that I do not really use this tool myself. @shazron?

I think the ultimate solution would be to use https://github.com/appcelerator/node-ios-device, which has permissive Apache 2.0 license, as discussed in apache/cordova-ios#429.

The recommended way to get our attention is via dev@cordova.apache.org and http://cordova.slack.com.

@sooxt98
Copy link

sooxt98 commented Oct 18, 2018

Hi @beardo01 @timtraversy @HelveticaScenario @brodybits I just pinged shazron.
image

@shazron
Copy link

shazron commented Oct 22, 2018

Looking at this right now.

@shazron
Copy link

shazron commented Oct 22, 2018

I don't have an XS to test with so I can't vouch for that test, but compiling the changes and deploying an app still works fine.

@shazron shazron merged commit b48dd9d into ios-control:master Oct 22, 2018
@brodycj
Copy link

brodycj commented Oct 22, 2018

Thanks @shazron!

@shazron
Copy link

shazron commented Oct 22, 2018

@sooxt98
Copy link

sooxt98 commented Oct 22, 2018

@shazron I wonder how to use brew upgrade to this latest one?
image

@trymnilsen
Copy link

Seems like npm is able to install version 1.9.4 which has this PR in it.
If you do

brew uninstall ios-deploy

and then

npm i -g ios-deploy

I got it working

geekonion pushed a commit to geekonion/ios-deploy that referenced this pull request Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants