I am using UDP communication in a app. Here is what i do,
Initialises a UDP broadcast connection object.
Bind it with a port to listen
Receives the IP & Port from the UDP connection to connect further with TCP connection.
After updating Xcode 15.3, It works until the iPad is connected with mac in debug mode. When i create build to test remotely, it stops receiving IP & Port from UDP connection.
Here is how i concluded this is Xcode issue,
I tried to debug this issue with Xcode 15.2 and it works as expected with debug and after creating build also.
Any help / suggestion would be appreciated.
Apple Silicon
RSS for tagBuild apps, libraries, frameworks, plug-ins, and other executable code that run natively on Apple silicon.
Posts under Apple Silicon tag
46 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
When running an iOS app as designed for iPad on an m1 Mac mini the UIImagePickerController.isSourceTypeAvailable(.camera) api returns true leading to a crash (attached) if the camera is selected to upload an image to the app as my much loved Mac mini does not have a camera.
For the moment have disabled camera if platform is Mac by adding the qualification:
ProcessInfo().isiOSAppOnMac == false but this seems like a bug or does the crash also happen on Macs with cameras?
Other image picker options work fine.
Crash log
Hello,
I am developing a tool in python or nodejs to intercept flows between two applications (MITM).
I want to use the FRIDA library, but when I use it I get the following error: Error: module not found at "/usr/lib/libSystem.B.dylib".
Indeed, the library is not present in the folder. I tried to get help directly from FRIDA but I couldn't find any help and on the current forum I did see some posts talking about this problem but I couldn't solve it.
Do you have an idea of how to solve this problem.
Thank you.
Ps: I'm new to the APPLE ecosystem (Mac mini - Apple M1)
It seems that Xcode Cloud currently only uses Intel machines for running the workflow jobs.
When will Apple Silicon machines be available and supported?
Call to std::remainder(double(411.0), int(365)); results in a crash due to a nan in libsystem_m.dylib. MCVE program is provided + lldb backtrace and system report.
$ clang++ -g -arch arm64 -std=c++20 main.cpp -o test
$ ./test
ori_fpcr=0, new_fpcr=1792
std::fmod(simTimeInDays, numDays) = 46
Illegal instruction: 4
main.cpp
#include <cassert>
#include <cfenv>
#include <cmath>
#include <iostream>
#if !defined(__arm64__) || !defined(__APPLE__)
# error "Meant to be run on arm64 apple"
#endif
inline int feenableexcept(unsigned int excepts) {
static fenv_t fenv;
if (std::fegetenv(&fenv) != 0) {
return -1;
}
const unsigned long long old_fpcr = fenv.__fpcr;
const unsigned int old_excepts = (old_fpcr >> 8u) & unsigned(FE_ALL_EXCEPT);
// Check the bits passed are valid, and bit shift them
const unsigned int new_excepts = excepts & unsigned(FE_ALL_EXCEPT);
const unsigned long long new_fpcr = new_excepts << 8u;
// Set the new bits
fenv.__fpcr = fenv.__fpcr | new_fpcr;
return (std::fesetenv(&fenv) != 0) ? -1 : static_cast<int>(old_excepts);
}
int main([[maybe_unused]] int argc, [[maybe_unused]] const char** argv) {
constexpr unsigned int flags = FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW;
static_assert(flags == 7);
constexpr uint32_t fpcr_flags_shifted = flags << 8;
constexpr uint32_t fpcr_flags = (__fpcr_trap_divbyzero | __fpcr_trap_invalid | __fpcr_trap_overflow);
static_assert(fpcr_flags_shifted == fpcr_flags);
static_assert(fpcr_flags_shifted == 1792);
uint32_t ori_fpcr = __builtin_arm_rsr("fpcr");
feenableexcept(flags);
uint32_t new_fpcr = __builtin_arm_rsr("fpcr");
// std::cout << "(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW) = " << flags << '\n';
// std::cout << "((FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW) << 8) = " << fpcr_flags_shifted << '\n';
// std::cout << "(__fpcr_trap_divbyzero | __fpcr_trap_invalid | __fpcr_trap_overflow) = " << fpcr_flags << '\n';
std::cout << "ori_fpcr=" << ori_fpcr << ", new_fpcr=" << new_fpcr << '\n';
const double simTimeInDays = 411.0;
const int numDays = 365;
// This is fine
std::cout << "std::fmod(simTimeInDays, numDays) = " << std::fmod(simTimeInDays, numDays) << '\n';
// This isn't
std::cout << "std::fmod(simTimeInDays, numDays) = " << std::remainder(simTimeInDays, numDays) << '\n';
return 0;
}
backtrace: see attachment
lldb_backtrace.txt
$ system_profiler SPSoftwareDataType SPHardwareDataType
Software:
System Software Overview:
System Version: macOS 13.2 (22D49)
Kernel Version: Darwin 22.3.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
Time since boot: 7 hours, 58 minutes
Hardware:
Hardware Overview:
Model Name: MacBook Pro
Model Identifier: MacBookPro18,2
Model Number: Z14V000NBFN/A
Chip: Apple M1 Max
Total Number of Cores: 10 (8 performance and 2 efficiency)
Memory: 64 GB
System Firmware Version: 8419.80.7
OS Loader Version: 8419.80.7
Activation Lock Status: Enabled
$ otool -L test
test:
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0
$ clang++ --version
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin22.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
I'm using M1pro and have successfully installed Numpy with Accelerate following, and it really speedup my programs. I also ran np.test() to check the correctness and every test passed.
However, I can't install Scipy with Accelerate, since the official document said Accelerate has a LAPACK of too old version. I can't even find a scipy that can pass scipy.test(). I tried the codes below:
conda install numpy 'libblas=*=*accelerate'
conda install scipy
np.test() as fails, sp.test() can't even finish
conda install numpy 'libblas=*=*openblas'
conda install scipy
Both np.test() and sp.test() can finish, but with many failures. I believe the bugs are due to Conda.
pip install --no-binary :all: --no-use-pep517 numpy
pip install scipy
np.test() has no failure and went fast, sp.test() uses OpenBLAS and has 3 failures. This is the best version I have found.
So my question is: can we find a reliable version of scipy on M1? Considering the popularity of scipy, I think it's not a high-living expectation.
And a question for Apple: is there really a plan to upgrade the LAPACK in Accelerate?